<template>
  <div class="access_lists">
    <ul class="access_info_lists">
      <li class="access_tit" v-if="!access">信息资讯</li>
      <li
        class="access_info_item"
        @click="$router.push({path:'/newsDetrails', query:{id: item.id}})"
        v-for="item in mountainList"
        :key="item.id"
      >
        <div class="info_fl">
          <p>{{item.title}}</p>
          <div class="info_fl_tow">
            <span>平台发布</span>
            <span>{{item.create_at}}</span>
          </div>
        </div>
        <div class="info_fr">
          <img class="info_fr_img" :src="item.image" alt />
        </div>
      </li>
      <li v-show="noMoreData" class="noMoreData">暂无更多数据</li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "AccessList",
  data () {
    return {
      scrollTop: 0
    }
  },
  props: {
    mountainList: {
      type: Array,
      default: [],
    },
    access: {
      type: String,
      default: "",
    },
    noMoreData: {
      type: Boolean,
      default: false,
    },
  },
  methods: {
  },
  filters: {
    img (url) {
      console.log(url);
    }
  },
};
</script>

<style lang="less" scoped>
.access_lists {
  .access_info_lists {
    padding: 0 12px;
    .access_tit {
      height: 40px;
      line-height: 40px;
      font-size: 16px;
    }
    .access_info_item {
      padding: 12px 0;
      display: flex;
      min-height: 100px;
      flex-wrap: wrap;
      border-bottom: 1px solid #eeeeee;
      .info_fr {
        margin-left: 10px;
        width: 110px;
        .info_fr_img {
          width: 100%;
          height: 100px;
          border-radius: 8px;
        }
      }
      .info_fl {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        .info_fl_one {
          display: -webkit-box;
          -webkit-box-orient: vertical;
          -webkit-line-clamp: 3;
          overflow: hidden;
          height: 55px;
          color: #333;
        }
        & p:nth-child(1) {
          font-size: 16px;
          font-weight: 700;
          line-height: 24px;
        }
        .info_fl_tow {
          display: flex;
          justify-content: space-between;
          color: #666;
        }
      }
    }
    .noMoreData {
      text-align: center;
      height: 50px;
      line-height: 50px;
      font-size: 14px;
    }
  }
}
</style>